#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>

int main()
{
	int** arr = (int**)malloc(sizeof(int*) * 3);
	assert(arr);

	for (int i = 0; i < 3; i++)
	{
		arr[i] = (int*)malloc(sizeof(int) * 5);
		assert(arr[i]);
	}

	for (int i = 0; i < 3; i++)
	{
		for (int j = 0; j < 5; j++)
		{
			arr[i][j] = 1;
		}
	}

	for (int i = 0; i < 3; i++)
	{
		for (int j = 0; j < 5; j++)
		{
			printf("%d ",arr[i][j]);
		}
		printf("\n");
	}


	for (int i = 0; i < 3; i++)
	{
		free(arr[i]);
		arr[i] = NULL;
	}
	free(arr);
	arr = NULL;
	return 0;
}